package chixing.day19.homework.work1;

import java.util.Map;

//封装了下订单后的优惠对象
public class Result {
    private Order order;//原始订单中： 用户，商品，订单原始总金额
    private double discountTotalPrice;//一共优惠的金额
    private Map<DiscountStrategy,Double> map; //优惠策略 - 优惠金额
    public Result(){}
    public Result(Order order, double discountTotalPrice, Map<DiscountStrategy, Double> map) {
        this.order = order;
        this.discountTotalPrice = discountTotalPrice;
        this.map = map;
    }

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }

    public double getDiscountTotalPrice() {
        return discountTotalPrice;
    }

    public void setDiscountTotalPrice(double discountTotalPrice) {
        this.discountTotalPrice = discountTotalPrice;
    }

    public Map<DiscountStrategy, Double> getMap() {
        return map;
    }

    public void setMap(Map<DiscountStrategy, Double> map) {
        this.map = map;
    }

    @Override
    public String toString() {
        return "Result{" +
                "order=" + order +
                ", discountTotalPrice=" + discountTotalPrice +
                ", map=" + map +
                '}';
    }
}
